package com.bluno.view;

import java.util.HashMap;
import java.util.Map;

import com.bluno.Util;
import com.bluno.view.obj.Button;
import com.bluno.view.obj.ImageObj;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;

public class WaitingRoomScene extends Scene{

	private Map<String, String> devices;
	public WaitingRoomScene(Context context)
	{
		super(context);
		this.background = Resourcer.imageMap.get("background0");
		devices = new HashMap<String, String>();
	}
	
	public void addDevice(String address, String name)
	{
		devices.put(address, name);
	}
	
	public String getDevice(String address)
	{
		return devices.get(address);
	}

	public void removeDevice(String address)
	{
		devices.remove(address);
	}

	@Override
	protected void onDraw(Canvas canvas)
	{
		super.onDraw(canvas);

		canvas.drawColor(Color.WHITE);
		int y = 40;
		for(String device : devices.values())
		{
			canvas.drawText(device, 160f, y, super.getPaint());
			y += 40;
		}
			
	}
}
